This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
Thanks a lot, especially for the update which made things a lot clearer for me.
Just one last hint: in trying carefully to follow all of your steps I copied most of your code. Which resulted in an error 500 in the browser. Reason was a variable declaration inside the theme's <value> node:
var computedField1 = XSP.getElementById...
Obviously this results in a conflict with the control of the same name. After changing the variable name to "compField" the example works perfectly!
Maybe you could alter your example once more...
And I'm sure it would make a good topic in the wiki, don't you think?
Thanks again for helping!
[Updated an hour later]:
hmm, it worked for me in a brand new xpage. But then I tried to implement that into an existing page, and there it doesn't work at all:
from firebug I can see that in the first simple test page there is a <script..> object right after the <form> tag containing the code that was created locally inside the theme. This script-block however is missing completely in the other page. Instead there is another script block at the end of the page's source, also containing a call to XSP.addonLoad, but that one is obviously created automatically by some XPage simple action.
Two more things I observed:
1. I'm used to call my js functions WITH a set of brackets as in "getBrowserInfo()", but in your code the function's name is passed into the XSP.addOnLoad method without the brackets. And indeed: if I include them in the call my code breaks. If that's the rule: why is it so and moreover, how wuold I pass arguments into such a function?
2. I tried to move the function into a JS script library that is called as a resource in the header of the theme. But then again my code breaks.
After having read your last post and with the first successful steps I thought I had understood, but now I'm no longer sure about it :-((
Feedback response number WEBB7NZDEU created by ~Justin Zekamanlen on 02/06/2009